package com.muyu.danmo.service.impl;

import com.muyu.danmo.domain.DanmoTrainingType;
import com.muyu.danmo.mapper.DanmoTrainingTypeMapper;
import com.muyu.danmo.service.IDanmoTrainingTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 培训班类型Service业务层处理
 *
 * @author yangle
 * @date 2024-10-10
 */
@Service
public class DanmoTrainingTypeServiceImpl implements IDanmoTrainingTypeService
{
    @Autowired
    private DanmoTrainingTypeMapper danmoTrainingTypeMapper;

    /**
     * 查询培训班类型
     *
     * @param id 培训班类型主键
     * @return 培训班类型
     */
    @Override
    public DanmoTrainingType selectDanmoTrainingTypeById(Long id)
    {
        return danmoTrainingTypeMapper.selectDanmoTrainingTypeById(id);
    }

    /**
     * 查询培训班类型列表
     *
     * @param danmoTrainingType 培训班类型
     * @return 培训班类型
     */
    @Override
    public List<DanmoTrainingType> selectDanmoTrainingTypeList(DanmoTrainingType danmoTrainingType)
    {
        return danmoTrainingTypeMapper.selectDanmoTrainingTypeList(danmoTrainingType);
    }

    /**
     * 新增培训班类型
     *
     * @param danmoTrainingType 培训班类型
     * @return 结果
     */
    @Override
    public int insertDanmoTrainingType(DanmoTrainingType danmoTrainingType)
    {
        return danmoTrainingTypeMapper.insertDanmoTrainingType(danmoTrainingType);
    }

    /**
     * 修改培训班类型
     *
     * @param danmoTrainingType 培训班类型
     * @return 结果
     */
    @Override
    public int updateDanmoTrainingType(DanmoTrainingType danmoTrainingType)
    {
        return danmoTrainingTypeMapper.updateDanmoTrainingType(danmoTrainingType);
    }

    /**
     * 批量删除培训班类型
     *
     * @param ids 需要删除的培训班类型主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTrainingTypeByIds(Long[] ids)
    {
        return danmoTrainingTypeMapper.deleteDanmoTrainingTypeByIds(ids);
    }

    /**
     * 删除培训班类型信息
     *
     * @param id 培训班类型主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTrainingTypeById(Long id)
    {
        return danmoTrainingTypeMapper.deleteDanmoTrainingTypeById(id);
    }
}
